import useLoginStore from '@/store/login/login'

function usePermissions(permissionID: string) {
  const loginStore = useLoginStore()
  const { permissions } = loginStore

  //获取到的数据是字符串数组如：system:users:create
  return !!permissions.find((item) => item.includes(permissionID))
}
export default usePermissions
